﻿<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="plugins/layui/css/layui.css" media="all" />
        <link rel="stylesheet" href="plugins/Gallery/css/style.css" media="all" />
        <link href="plugins/Photo/Photo.css" rel="stylesheet" />
        <!--编辑器组件-->
        <link rel="stylesheet" href="kindeditor/themes/default/default.css" />
        <link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" />
        <script type="text/javascript" src="js/jquery-3.1.1.min.js" ></script>
	</head>

	<body>
		<div style="margin: 15px;">
            <blockquote class="layui-elem-quote">
                <a href="javascript:;" class="layui-btn layui-btn-small" id="add">
                    <i class="layui-icon">&#xe608;</i> 图片上传
                </a>
                <a href="javascript:;" class="layui-btn layui-btn-small" id="addclass">
                    <i class="layui-icon">&#xe608;</i> 添加分类
                </a>
                <a href="javascript:;" class="layui-btn layui-btn-small" id="classmanagement">
                    <i class="layui-icon">&#xe608;</i> 分类管理
                </a>
                <a href="#" class="layui-btn layui-btn-small" id="checkAll" >
                    <i class="layui-icon">&#xe608;</i> 全部选中
                </a>
                <a href="#" class="layui-btn layui-btn-small" id="dellAll">
                    <i class="layui-icon">&#xe608;</i> 批量删除
                </a>
                <a href="#" class="layui-btn layui-btn-small" id="reload">
                    <i class="fa fa-shopping-cart" aria-hidden="true"></i> 刷新页面
                </a>
                <a href="javascript:;" class="layui-btn layui-btn-small" id="search">
                    <i class="layui-icon">&#xe615;</i> 搜索
                </a>
            </blockquote>
			<fieldset class="layui-elem-field">
				<legend>演示</legend>
				<div class="layui-field-box">
                    <div id="effect-6" class="effects clearfix">
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>  
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>
                        <div class="img">
                            <img src="plugins/Gallery/img/jpg/1.jpg" alt="">
                            <div class="overlay">
                                <a class="check-overlay" href="#"><img src="plugins/Gallery/img/false.png" /></a>
                                <a class="delete-overlay" href="#"><img src="plugins/Gallery/img/delete.png" /></a>
                                <a class="edit-overlay" href="#"><img src="plugins/Gallery/img/edit.png" /></a>
                                <a class="link-overlay" href="#"><img src="plugins/Gallery/img/link.png" /></a>
                            </div>
                        </div>           
                    </div>
                    <select id="select_row">
                        <option value="10">10</option>
                    </select>
				</div>
			</fieldset>
		</div>
        <div class="mask">
            <div class="btnl layui-icon">&#xe603;</div>
            <div class="btnr layui-icon">&#xe602;</div>
            <div class="close"> × </div>
            <img alt="预览" />
        </div>
		<script type="text/javascript" src="plugins/layui/layui.js"></script>
        <script type="text/javascript" src="plugins/Gallery/js/modernizr.js"></script>
        <!--编辑器组件-->
<script charset="utf-8" src="kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="kindeditor/lang/zh-CN.js"></script>
<script charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script>
        
        <!--<script src="plugins/Photo/Photo.js"></script>-->
        <script src="ajax/main-gallery.js"></script>
        <script>
            $(document).ready(function () {
                var field_idA = new Array("id", "classname", "filename", "path", "time");
                var field_idB = new Array("classname", "time");
                layui.use(['form', 'laypage', 'layer'], function () {
                    var $ = layui.jquery,
                    layer = parent.layer === undefined ? layui.layer : parent.layer;
                    laypage = layui.laypage;
                    form = layui.form();
                    CJPlugin.init({
                        'get_url': "GetImgList",
                        'field_idA': field_idA,
                        'field_idB': field_idB,
                        'container': "effect-6",
                        'row': 10,
                        'column': 8,
                        'tableA': "picture",
                        'tableB': "pictureclass",
                        'curr_num': 0,
                        'dialogID': 0,
                        'select_row': localStorage.rowlength,
                    });
                    //CJPlugin.GetValue();
                    //CJPlugin.paging();
                    //form.render(); //更新全部
                    //form.render('checkbox'); //刷新select选择框渲染
                    form.on('checkbox(selected-all)', function (data) {
                        var elem = data.elem;

                        $('#cont').children('tr').each(function () {
                            var $that = $(this);
                            //全选或反选
                            $that.children('td').eq(0).children('input[type=checkbox]')[0].checked = elem.checked;
                            form.render('checkbox');
                        });
                    });
                    //监听下拉框开关
                    //form.on('select(select_row)', function (data) {
                    //    namespaces.Param.changerow(data.value);
                    //});

                });
            })
            function nofind() {

                var img = event.srcElement;

                img.src = "http://www.w3school.com.cn/i/eg_tulip.jpg";

                img.onerror = null; //控制不要一直跳动

            }

        </script>

	</body>

</html>